﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Profile;

namespace MyMembership.Models
{
public class UserProfile: ProfileBase
{
    [SettingsAllowAnonymous(false)]
    public string FirstName
    {
        get { return base["FirstName"] as string; }
        set { base["FirstName"] = value; }
    }

    [SettingsAllowAnonymous(false)]
    public string LastName
    {
        get { return base["LastName"] as string; }
        set { base["LastName"] = value; }
    }

    public int Age
    {
        get { return (int)base["Age"]; }
        set { base["Age"] = value; }
    }

    public static UserProfile GetUserProfile(string username)
    {
        return Create(username) as UserProfile;
    }
}
}
    